/**
 *
 */
package com.angel.mocks.data.generator.dataGenerator;

import java.util.Collection;

import com.angel.dao.generic.factory.DAOFactory;
import com.angel.dao.generic.interfaces.GenericDAO;
import com.angel.data.generator.interfaces.DataGenerator;
import com.angel.mocks.data.generator.daos.impl.RoleDAOHibernate;
import com.angel.mocks.data.generator.domainObject.Role;

/**
 * @author William
 *
 */
public class RoleDataGenerator implements DataGenerator{

	/**
	 *
	 */
	private static final long serialVersionUID = -4249090009047157954L;

	public void generateData(Collection<Object> dataCollection, DAOFactory daoFactory) {
		Role admin = new Role();
		admin.setName("Admin");
		admin.setDescription("Administrator");
		dataCollection.add(admin);

		Role user = new Role();
		user.setName("User");
		user.setDescription("Default User");
		dataCollection.add(user );
	}

	public Class<? extends Object> getDataGeneratorClass() {
		return Role.class;
	}

	@SuppressWarnings("unchecked")
	public Class<? extends DataGenerator>[] getDependecesGenerators() {
		return null;
	}

	@SuppressWarnings("unchecked")
	public GenericDAO getGenericDAO() {
		return new RoleDAOHibernate();
	}

	public Class<?> thisDataGeneratorClass() {
		return this.getClass();
	}
}
